package net.xpyun.platform.opensdk.service;

import net.xpyun.platform.opensdk.vo.*;

import java.util.List;

public interface PrintService {
    /**
     * 1.批量添加打印机
     * @param restRequest
     * @return
     */
     ObjectRestResponse<PrinterResult> addPrinters(AddPrinterRequest restRequest);

    /**
     * 2.设置打印机语音类型
     * @param restRequest
     * @return
     */
     ObjectRestResponse<Boolean> setPrinterVoiceType(SetVoiceTypeRequest restRequest);
    /**
     * 3.打印小票订单
     * @param restRequest
     * @return
     */
     ObjectRestResponse<String> print(PrintRequest restRequest);
    /**
     * 4.打印标签订单
     * @param restRequest
     * @return
     */
     ObjectRestResponse<String> printLabel(PrintRequest restRequest);

    /**
     * 5.批量删除打印机
     * @param restRequest
     * @return
     */
     ObjectRestResponse<PrinterResult> delPrinters(DelPrinterRequest restRequest);
    /**
     * 6.修改打印机信息
     * @param restRequest
     * @return
     */
     ObjectRestResponse<Boolean> updPrinter(UpdPrinterRequest restRequest);

    /**
     * 7.清空待打印队列
     * @param restRequest
     * @return
     */
     ObjectRestResponse<Boolean> delPrinterQueue(PrinterRequest restRequest);

    /**
     * 8.查询订单是否打印成功
     * @param restRequest
     * @return
     */
     ObjectRestResponse<Boolean> queryOrderState(QueryOrderStateRequest restRequest);

    /**
     * 9.查询打印机某天的订单统计数
     * @param restRequest
     * @return
     */
     ObjectRestResponse<OrderStatisResult> queryOrderStatis(QueryOrderStatisRequest restRequest);
    /**
     * 10.查询打印机状态
     *
     * 0、离线 1、在线正常 2、在线不正常
     * 备注：异常一般是无纸，离线的判断是打印机与服务器失去联系超过30秒
     * @param restRequest
     * @return
     */
     ObjectRestResponse<Integer> queryPrinterStatus(PrinterRequest restRequest);

    /**
     * 10.批量查询打印机状态
     *
     * 0、离线 1、在线正常 2、在线不正常
     * 备注：异常一般是无纸，离线的判断是打印机与服务器失去联系超过30秒
     * @param restRequest
     * @return
     */
     ObjectRestResponse<List<Integer>> queryPrintersStatus(PrintersRequest restRequest);

    /**
     * 11.云喇叭播放语音
     * @param restRequest
     * @return
     */
     ObjectRestResponse<String> playVoice(VoiceRequest restRequest);
    /**
     * 12.POS指令
     * @param restRequest
     * @return
     */
     ObjectRestResponse<String> pos(PrintRequest restRequest);
    /**
     * 13.钱箱控制
     * @param restRequest
     * @return
     */
     ObjectRestResponse<String> controlBox(PrintRequest restRequest);
}
